package com.zxl.grocerymicroservicewechatmeal.exception;

import com.zxl.grocerymicroservicewechatmeal.enums.ResultEnum;
import lombok.Getter;

/**
 * @Author: zxl
 * @Description:
 * @Date: Created in 9:58 2017/11/16
 * @Modified By:
 */
@Getter
public class SellException extends RuntimeException{
    private Integer code;

    public SellException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();
    }

    public SellException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
